package initialize

import (
	"github.com/go-playground/locales/zh"
	ut "github.com/go-playground/universal-translator"
)

func InitTrans() (trans ut.Translator) {
	// 创建中文语言的translator
	zhLocale := zh.New()
	uni := ut.New(zhLocale, zhLocale)
	trans, _ = uni.GetTranslator("zh")

	return trans
}
